//
//  STDSRenderBuffer.hpp
//  STDRenderSDK
//
//  Created by 陈学明 on 2023/3/12.
//

#ifndef STDSRenderBuffer_hpp
#define STDSRenderBuffer_hpp

#include <stdio.h>
#include "STDSOpenGL.h"

class STDSRenderBuffer {

public:
    STDSRenderBuffer(int _w, int _h);

    ~STDSRenderBuffer();

    GLuint getDepId();
    
    GLuint getRboId();

private:
    void _createRenderBuffer();

    void _release();

private:
    STDSRenderBuffer(const STDSRenderBuffer &);

    STDSRenderBuffer &operator=(const STDSRenderBuffer &a);
    GLuint mFboId{HANDLE_NON};
    GLuint mDepId{HANDLE_NON};
    GLuint mRboId{HANDLE_NON};
    
    int mPreFboId{0};
    int mPreRboId{0};
    
    int mSizeW{0};
    int mSizeH{0};
};
#endif /* RenderBuffer_hpp */
